<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FileEncoding</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>FileEncoding <span class="ver">[AHK_L 42+]</span></h1>

<p>Sets the default encoding for <a href="FileRead.htm">FileRead</a>, <a href="FileReadLine.htm">FileReadLine</a>, <a href="LoopReadFile.htm">Loop Read</a>, <a href="FileAppend.htm">FileAppend</a>, and <a href="FileOpen.htm">FileOpen</a>.</p>

<pre class="Syntax">FileEncoding [, Encoding]</pre>
<p>Encoding can be one of the following values:</p>
<ul>
  <li><code>UTF-8</code>: Unicode UTF-8, equivalent to CP65001.</li>
  <li><code>UTF-16</code>: Unicode UTF-16 with little endian byte order, equivalent to CP1200.</li>
  <li><code>UTF-8-RAW</code> or <code>UTF-16-RAW</code>: As above, but no byte order mark is written when a new file is created.</li>
  <li><code>CP<i>nnn</i></code>: a code page with numeric identifier <i>nnn</i>.  See <a href="http://msdn.microsoft.com/en-us/library/dd317756.aspx">Code Page Identifiers</a>.</li>
  <li>Empty or omitted: the system default ANSI code page, which is also the default setting.</li>
</ul>

<h3>Remarks</h3>
<p><code>A_FileEncoding</code> contains the current setting.</p>

<h3>Related</h3>
<p><a href="FileOpen.htm">FileOpen</a>, <a href="StrPutGet.htm">StrPut/StrGet</a>, <a href="../Compat.htm#FileRead">Script Compatibility</a></p>

</body>
</html>
